import requests
headers={
    "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36"
}
url = "https://picui.cn/images?page=1"
a = 1
re=requests.get(url,headers=headers)
print(re.status_code)#查看请求状态，返回200说明正常
path='test.jpg'#文件储存地址
with open(path, 'wb') as f:#把图片数据写入本地，wb表示二进制储存
    for chunk in re.iter_content(chunk_size=128):
        f.write(chunk)

